﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>

<%	dim rs,sql,i,infoid,Page,backurl,dat,dat1
	const PageSize=10	'每页10

	infoid=Request.QueryString("infoid")
	if infoid="" then infoid=0
	if not isnumeric(infoid) then infoid=0
	infoid=clng(infoid)

    	Page = Request("page")      '当前页数
    	If Page = "" Then Page = 1
   	If Not IsNumeric(Page) Then Page = 1
    	Page = CLng(Page)
    	If Page < 1 Then Page = 1

	backurl=Request.QueryString("backurl")


	Set Rs = Server.CreateObject("Adodb.Recordset")



select case v
case "0"
we0="<br/>"
book="<input name=""remark"" type=""text"" maxlength=""128"" emptyok=""true"" value="""" /><anchor title=""发表"">发表<go href='photoshowing.asp?id="&infoid&"&amp;sid="&sidd&"' method='post'><postfield name=""remark"" value=""$(remark)"" /></go></anchor><br/>"
%>
<card title="查看评论"><p align="<%=qingtian.px%>">
<%
case "1"
hr="<hr>"
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
book=""&dao&"<form action=""photoshowing.asp?id="&infoid&"&amp;sid="&sidd&""" method=""post""><input type=""text"" name=""remark"" value="""" /><input type=""submit"" value=""发表"" /></form>"&we0&"<hr>"
%>
<title>查看评论</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%

End Select

%>

<%
	
		if sid="Null" then
		%><%=dao%><%=zi%>欢迎你<%=zi0%><a href="login.asp?sid=<%=sidd%>&amp;url=photoshowinglist.asp?infoid=<%=infoid%>@@v=<%=v%>@@fv=<%=fv%>@@sid=<%=sidd%>@@&amp;backurl=<%=Replace(backurl,"@@","@*@")%>">注册/登陆</a><%=we0%><%
		else
		qingtian.info
		end if


		%><%=we%><a href="photove.asp?id=<%=infoid%>&amp;sid=<%=sidd%>">返回图片下载页</a><%=we0%>
		<%=book%>
		<%


     		Sql = "select  [content],[user],[uid] from [qingtian_photo_reply]  where  listid="&infoid&"   order by [id] desc"

		Rs.Open Sql,conn,1,1

		if not (rs.bof and rs.eof)  then

				Rs.PageSize = 15	'一页N条记录
				IF Not IsEmpty(Page) Then
					IF Not IsNumeric(Page) Then		'判断Page是否为数字
						Page=1
					Else
						Page=Cint(Page)		'转换成短整形Integer
					End IF
					IF Page > Rs.PageCount Then
						Rs.AbsolutePage = Rs.PageCount	'设置当前显示页等于最后一页
					ElseIF Page <= 0 Then
						Rs.AbsolutePage = 1		'设置当前页等于第一页
					Else
						Rs.AbsolutePage = Page	'如果大于零,显示当前页等于接收的页数
					End IF
				Else
					Rs.AbsolutePage = 1
				End IF
				Page = Rs.AbsolutePage


		For i=1 to  Rs.PageSize
		If Rs.Eof Then
			exit For
		End If
			%>
			<%
dat=rs.RecordCount-(page-1)*15-i+1
dat1=dat mod 2
if dat1=0 then
%>
<%=we%><%=zi%><%=dat%>楼:<%=zi0%>[<%=qingtian.utf8(rs("user"))%>]说:<%=qingtian.ubb(rs("content"))%><%=we0%>
<%
else
%>
<%=sou%><%=zi%><%=dat%>楼:<%=zi0%>[<%=qingtian.utf8(rs("user"))%>]说:<%=qingtian.ubb(rs("content"))%><%=we0%>
<%		
End If


                Rs.MoveNext
                next
%>
<%=hr%><%=dao%>
<%
    		'分页
    		If Page < rs.PageCount Then
    		    Response.Write("<a href='photoshowinglist.asp?infoid="&infoid&"&amp;page=" & Page + 1 & "&amp;sid="&sidd&"'>下一页</a>")
    		End If
       
    		If Page > 1 And Page < rs.PageCount Then
    		    Response.Write("|")
    		End If
        
    		If Page > 1 Then
    		    Response.Write("<a href='photoshowinglist.asp?infoid="&infoid&"&amp;page=" & Page - 1 & "&amp;sid="&sidd&"'>上一页</a>"&we0&"")
    		Elseif rs.PageCount >1 then
    		    Response.Write(""&we0&"")
    		End If
            
    		Randomize()
    
    		If rs.PageCount > 100 Then
    		    Response.Write("<input name='Page' format='*N' size='5' maxlength='5'/>")
    		    Response.Write("<a href='photoshowinglist.asp?infoid="&infoid&"&amp;page=$(Page:n)&amp;sid="&sidd&"'>跳页</a>"&we0&"")
    		End If
                                                                
    		Response.Write("" & we & "(第" & Page & "/总" & rs.PageCount & "页/共" & rs.RecordCount & "条)"&we0&"")

		else
			%><%=sou%>暂无评论<%=we0%><%
		end if
		Rs.close


			
	set rs=nothing

		%><%=sou%><a href="photove.asp?id=<%=infoid%>&amp;sid=<%=sidd%>">返回图片下载页</a><%=we0%><%

    		    Response.Write("" & dao & "<a href='index.asp?sid="&sidd&"'>网站首页</a><br/>")

end Function
%>
